package com.example.app.dao;

import com.example.app.entity.LiveLocation;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class LiveLocationDto {
    private Long userId;
    private double latitude;
    private double longitude;
    private LocalDateTime updatedAt;

    public static LiveLocationDto fromEntity(LiveLocation e) {
        return new LiveLocationDto(e.getUserId(), e.getLatitude(), e.getLongitude(), e.getUpdatedAt());
    }
}
